//
//  TKYCustomButton.m
//  ProgressReportProject
//
//  Created by apple on 2018/4/27.
//  Copyright © 2018年 铁科院. All rights reserved.
//

#import "TKYCustomButton.h"

@implementation TKYCustomButton

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self=[super initWithFrame:frame]) {
        
    }
    return self;
}
//自定义按钮的图片在上面
- (CGRect)imageRectForContentRect:(CGRect)contentRect
{
    CGFloat imageX = _imageRect.origin.x;
    CGFloat imageY = _imageRect.origin.y;
    CGFloat imageW = CGRectGetWidth(_imageRect);
    CGFloat imageH = CGRectGetHeight(_imageRect);
    return CGRectMake(imageX, imageY, imageW, imageH);
}

//自定义按钮的文字在下面
- (CGRect)titleRectForContentRect:(CGRect)contentRect
{
    CGFloat titleX = _titleRect.origin.x;
    CGFloat titleY = _titleRect.origin.y;
    
    CGFloat titleW = CGRectGetWidth(_titleRect);
    
    CGFloat titleH = CGRectGetHeight(_titleRect);
    return CGRectMake(titleX, titleY, titleW, titleH);
}


@end
